package jgl.vajra.kingkong.part.vehicle.viewModel;

import java.util.List;
import java.util.Map;

import jgl.vajra.kingkong.bean.CouponAvailableBean;
import jgl.vajra.kingkong.part.vehicle.contract.CouponAvailableContract;
import jgl.vajra.kingkong.part.vehicle.model.CouponAvailableModel;
import jgl.vajra.kingkong.widget.mvvm.factory.CreateModel;
import jgl.vajra.kingkong.widget.retrofithelper.rxsubscriber.ProgressObserver;

@CreateModel(CouponAvailableModel.class)
public class CouponAvailableViewModel extends CouponAvailableContract.ViewModel{
    @Override
    public void getCouponsAvailableData(Map<String, Object> map) {
        mModel.getCouponsAvailableData(map).subscribe(new ProgressObserver<List<CouponAvailableBean>>(false,this) {
            @Override
            public void _onNext(List<CouponAvailableBean> data) {
                mView.returnCouponsAvailableData(data);
            }
        });
    }
}
